import request from '@/utils/request'

// 登录
export function login(data) {
	return request({
		url: '/admin/user/login',
		method: 'post',
		data: data
	})
}

// 退出
export function logout(data) {
  console.log(data)
	return request({
		url: '/admin/user/exit',
		method: 'post',
		data: data
	})
}

// 新增用户
export function addUser(data) {
	return request({
		url: '/admin/user/add',
		method: 'post',
		data: data
	})
}
// 修改用户
export function editUser(data) {
	return request({
		url: '/admin/user/update',
		method: 'post',
		data: data
	})
}

// 删除用户
export function deleteUser(data) {
	return request({
		url: '/admin/user/del',
		method: 'post',
		data: data
	})
}

// 查询用户列表
export function getUserList(data) {
	return request({
		url: '/admin/user/list',
		method: 'post',
		data: data
	})
}

// 查询用户详情
export function getUserDetail(data) {
	return request({
		url: '/admin/user/' + data,
		method: 'get'
	})
}
